/*
 * Project Name:yunjiafen
 * File Name:InterceptorRegisterBean.java
 * Package Name:com.bestapp.yunjiafen.core.configuration
 * Date:2018年10月17日下午10:31
 * Copyright (c) 2018, bestapp All Rights Reserved.
 *
 */

package com.gitee.xmhzzz.component.web.intercepter;

import org.springframework.web.servlet.HandlerInterceptor;

/**
  * @ClassName
  * @Description
  * @Author wzq
  * @Date 2023/12/18 9:48
  * @Version 1.0
  */
public interface InterceptorRegisterBean {

    /**
     * 拦截的路径
     *
     * @return
     */
    default String[] paths() {
        return new String[]{"/**"};
    }

    /**
     * 拦截器需要实现
     *
     * @return
     */
    default HandlerInterceptor interceptor() {
        return (HandlerInterceptor) this;
    }

    /**
     * 不拦截路径
     *
     * @return
     */
    default String[] excludePaths() {
        return new String[]{};
    }
}
